%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/nodeId-earlyExit"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 8, 13, 14, 57, 61, 67, 68, 69, 70, 9, 15, 17, 20, 21, 28, 34, 37, 38<br />2: 12, 23, 31, 40<br />3: 16, 26, 33, 43<br />ᐳ: 25, 27, 42, 44<br />4: 45, 49"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 16, 45, 57<br /><br />ROOT Connectionᐸ12ᐳ[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 27<br /><br />ROOT PgSelectSingleᐸpersonᐳ[27]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 33, 49, 61<br /><br />ROOT Connectionᐸ31ᐳ[33]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 44<br /><br />ROOT PgSelectSingleᐸpersonᐳ[44]"):::bucket
    Bucket7("Bucket 7 (listItem)<br />Deps: 57<br /><br />ROOT __Item{7}ᐸ45ᐳ[53]"):::bucket
    Bucket8("Bucket 8 (listItem)<br />Deps: 61<br /><br />ROOT __Item{8}ᐸ49ᐳ[55]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 54, 57<br /><br />ROOT PgSelectSingle{7}ᐸpersonᐳ[54]"):::bucket
    Bucket10("Bucket 10 (nullableBoundary)<br />Deps: 56, 61<br /><br />ROOT PgSelectSingle{8}ᐸpostᐳ[56]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3 & Bucket4
    Bucket1 --> Bucket7
    Bucket3 --> Bucket8
    Bucket7 --> Bucket9
    Bucket8 --> Bucket10

    %% plan dependencies
    __InputObject9{{"__InputObject[9∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[8]<br />- Constantᐸ'Twenty Seventwo'ᐳ[67]"}}:::plan
    PgSelect12[["PgSelect[12∈0] ➊<br />ᐸpersonᐳ"]]:::plan
    Object15{{"Object[15∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    ApplyInput17{{"ApplyInput[17∈0] ➊"}}:::plan
    Object15 & ApplyInput17 --> PgSelect12
    Access13{{"Access[13∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access14{{"Access[14∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access13 & Access14 --> Object15
    PgSelect23[["PgSelect[23∈0] ➊<br />ᐸpersonᐳ"]]:::plan
    Access21{{"Access[21∈0] ➊<br />ᐸ20.1ᐳ"}}:::plan
    Access21 -->|rejectNull| PgSelect23
    Object15 --> PgSelect23
    __InputObject28{{"__InputObject[28∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[8]<br />- Constantᐸ'Is that a cooking show?'ᐳ[69]"}}:::plan
    PgSelect31[["PgSelect[31∈0] ➊<br />ᐸpostᐳ"]]:::plan
    ApplyInput34{{"ApplyInput[34∈0] ➊"}}:::plan
    Object15 & ApplyInput34 --> PgSelect31
    PgSelect40[["PgSelect[40∈0] ➊<br />ᐸpersonᐳ"]]:::plan
    Access38{{"Access[38∈0] ➊<br />ᐸ37.1ᐳ"}}:::plan
    Access38 -->|rejectNull| PgSelect40
    Object15 --> PgSelect40
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access13
    __Value2 --> Access14
    Connection16[["Connection[16∈0] ➊<br />ᐸ12ᐳ"]]:::plan
    PgSelect12 --> Connection16
    __InputObject9 --> ApplyInput17
    Lambda20{{"Lambda[20∈0] ➊<br />ᐸspecifier_Person_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJwZW9wbGUiLDZd'ᐳ[68]"}}:::plan
    Lambda20 --> Access21
    First25{{"First[25∈0] ➊"}}:::plan
    PgSelectRows26[["PgSelectRows[26∈0] ➊"]]:::plan
    PgSelectRows26 --> First25
    PgSelect23 --> PgSelectRows26
    PgSelectSingle27{{"PgSelectSingle[27∈0] ➊<br />ᐸpersonᐳ"}}:::plan
    First25 --> PgSelectSingle27
    Connection33[["Connection[33∈0] ➊<br />ᐸ31ᐳ"]]:::plan
    PgSelect31 --> Connection33
    __InputObject28 --> ApplyInput34
    Lambda37{{"Lambda[37∈0] ➊<br />ᐸspecifier_Person_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJwb3N0cyIsM10='ᐳ[70]"}}:::plan
    Lambda37 --> Access38
    First42{{"First[42∈0] ➊"}}:::plan
    PgSelectRows43[["PgSelectRows[43∈0] ➊"]]:::plan
    PgSelectRows43 --> First42
    PgSelect40 --> PgSelectRows43
    PgSelectSingle44{{"PgSelectSingle[44∈0] ➊<br />ᐸpersonᐳ"}}:::plan
    First42 --> PgSelectSingle44
    ConnectionItems45[["ConnectionItems[45∈0] ➊"]]:::plan
    Connection16 --> ConnectionItems45
    ConnectionItems49[["ConnectionItems[49∈0] ➊"]]:::plan
    Connection33 --> ConnectionItems49
    PgClassExpression48{{"PgClassExpression[48∈2] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle27 --> PgClassExpression48
    PgClassExpression52{{"PgClassExpression[52∈4] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle44 --> PgClassExpression52
    __Item53[/"__Item[53∈7]<br />ᐸ45ᐳ"\]:::itemplan
    ConnectionItems45 ==> __Item53
    PgSelectSingle54{{"PgSelectSingle[54∈7]<br />ᐸpersonᐳ"}}:::plan
    __Item53 --> PgSelectSingle54
    __Item55[/"__Item[55∈8]<br />ᐸ49ᐳ"\]:::itemplan
    ConnectionItems49 ==> __Item55
    PgSelectSingle56{{"PgSelectSingle[56∈8]<br />ᐸpostᐳ"}}:::plan
    __Item55 --> PgSelectSingle56
    List59{{"List[59∈9]<br />ᐸ57,58ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[57]"}}:::plan
    PgClassExpression58{{"PgClassExpression[58∈9]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression58 --> List59
    PgSelectSingle54 --> PgClassExpression58
    Lambda60{{"Lambda[60∈9]<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List59 --> Lambda60
    PgClassExpression65{{"PgClassExpression[65∈9]<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle54 --> PgClassExpression65
    List63{{"List[63∈10]<br />ᐸ61,62ᐳ<br />More deps:<br />- Constantᐸ'posts'ᐳ[61]"}}:::plan
    PgClassExpression62{{"PgClassExpression[62∈10]<br />ᐸ__post__.”id”ᐳ"}}:::plan
    PgClassExpression62 --> List63
    PgSelectSingle56 --> PgClassExpression62
    Lambda64{{"Lambda[64∈10]<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List63 --> Lambda64
    PgClassExpression66{{"PgClassExpression[66∈10]<br />ᐸ__post__.”headline”ᐳ"}}:::plan
    PgSelectSingle56 --> PgClassExpression66

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject9,PgSelect12,Access13,Access14,Object15,Connection16,ApplyInput17,Lambda20,Access21,PgSelect23,First25,PgSelectRows26,PgSelectSingle27,__InputObject28,PgSelect31,Connection33,ApplyInput34,Lambda37,Access38,PgSelect40,First42,PgSelectRows43,PgSelectSingle44,ConnectionItems45,ConnectionItems49 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression48 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4,PgClassExpression52 bucket4
    classDef bucket7 stroke:#808000
    class Bucket7,__Item53,PgSelectSingle54 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,__Item55,PgSelectSingle56 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression58,List59,Lambda60,PgClassExpression65 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgClassExpression62,List63,Lambda64,PgClassExpression66 bucket10

